﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using JQueryControlToolkit;
using System.Web;

namespace UIT.Web
{
    public static class ScriptManager
    {
        internal static IDictionary<string, DomResult> RegisteredScripts
        {
            get
            {
                IDictionary<string, DomResult> scripts = (IDictionary<string, DomResult>)HttpContext.Current.Items[typeof(ScriptManager)];
                if (scripts == null)
                    HttpContext.Current.Items[typeof(ScriptManager)] = scripts = new Dictionary<string, DomResult>();
                return scripts;
            }
        }

        public static void RegisterCall(string key, DomResult script)
        {
            RegisteredScripts[key] = script;
        }
    }
}
